package config

import (
	"gitee.com/dreamwood/jxgo/v1/core"
	hlp "gitee.com/dreamwood/jxgo/v1/helper"
	"gitee.com/dreamwood/jxgo/v1/mgorm"
)

func init() {
	hlp.CreateConfigFromYml("./app.yaml", "server", &core.ConfigServer)
	hlp.CreateConfigFromYml("./app.yaml", "api", &core.ConfigApi)
	hlp.CreateConfigFromYml("./app.yaml", "core", &core.ConfigCore)
	hlp.CreateConfigFromYml("./app.yaml", "service", &core.ConfigService)
	//初始化mongo
	hlp.CreateConfigFromYml("./app.yaml", "mongodb", &core.ConfigMongo)
	core.DBMongo = mgorm.NewMongoDb(core.ConfigMongo)

}
